package com.itheima.d5_genericity;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        MyArrayList<String> myArrayList = new MyArrayList<>();
        myArrayList.add("Java");
        System.out.println(myArrayList);
    }
}
class MyArrayList<T> {
    ArrayList<T> arrayList = new ArrayList<>();
    public void add(T t) {
         //我们模拟一下
        arrayList.add(t);
    }
    public void delete(T t) {
        arrayList.remove(t);
    }

    @Override
    public String toString() {
       return arrayList.toString();
    }
}